Repository navigation
Peel a title written before a family comma into the title - #706
Merged
Merged
Conversation
`Dr. Smith, John` read family 'Dr. Smith' in every release from 1.4.0 through 2.4.2. A run of listed title words opening the part before a family comma now goes to `title` (rules.md#H6): vocabulary only, so `Xyz. Smith, John` keeps its family; it stops at a word that is a particle too (`St Pierre`, `Freiherr von Berg`) and where nothing but post-nominals stands behind it (H3's floor: `MD PhD Jr., John`), and it leaves the family its last word. Amends H1, H2, H3 and C1's Accepted clauses, qualifies C1, S2 and W3, adds decisions.md#H6 with the measurements, and re-records the snapshot (20 corpus moves, all a title leaving the family) and the CLDR agreement (29 fields now agree, 28 closer, none regress). Closes #701 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s-before-family-comma # Conflicts: # docs/release_log.rst
#705 listed bapak, and the CLDR id rendering 'Bapak Adinata, Dwi Putro bin MP' now peels it before the family comma. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #706 +/- ##
=======================================
Coverage 99.03% 99.03%
=======================================
Files 46 46
Lines 4541 4552 +11
=======================================
+ Hits 4497 4508 +11
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Add gov to TITLES (Derek): `Lt. Gov. Smith, John` split the compound across title and family, the run being vocabulary-only. 236 US Census surname bearers; recorded in decisions.md#H6. - Keep `Dr. PhD Smith, John` at family 'PhD Smith' (Derek), and say in the comment that the run's first leftover piece is family. - H6's Accepted clause names the particle stop, not the 1919 surname argument, as what keeps Freiherr; Graf peels (example added). - Wording: H6 "or" and "at least one word", H3 "one word", H1 "name word", W3's H6 sentence, AGENTS.md's stop description and its #701 lesson as its own sentence, usage.rst's bullet, the release log. - Rows: joined title units, Lt. Gov., Dr. King, a FAMILY_FIRST_GIVEN_LAST twin, bare Gov. - Move the H6 block above the P2 comment it interrupted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The branch's family 'PhD Smith' matches 1.4.0 only for the untitled 'PhD Smith, John'; 1.4.0 gave the titled form family 'Dr. Smith', suffix 'PhD' (the fix-commit review, checked against the wheel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The /simplify review found the comment's 'H3's floor' invited swapping in leading_titles, whose one-word give-back reads 'MD PhD Jr.' with title 'MD'. Comment-only: frames and the snapshot are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An inline tag test ahead of is_title_piece leaves a family part no title opens free of frames (Smith Jones, John back to master's 203), and the family loop no longer re-asks a piece the floor walk already proved a suffix (Dr. Smith + 20 PhD, John 924 -> 904). No reading moved on an 88,740-head grid under two orders; the snapshot matches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #701.
What changes
A run of listed title words opening the part before a family comma now goes to
titleinstead of the family. Every release from 1.4.0 through 2.4.2 read it into the family (checked against the 1.4.0, 2.0.0, 2.3.0 and 2.4.2 wheels).Dr. Smith, JohnDr. SmithDr., familySmithProf. Dr. Brühl, AdaProf. Dr. BrühlProf. Dr.г-н Вернер, Иван Асенг-н Вернерг-нRev. Sr. Smith, MaryRev. Smith, suffixSr.Rev. Sr.Xyz. Smith, JohnXyz. SmithSt Pierre, Ed,Freiherr von Berg, EdMD PhD Jr., JohnMDThe run is defined in the new rule rules.md#H6:
St,Freiherr, bare or period-marked). That keeps C1's 1919 legal-surname reading.Accepted cost:
King Smith, Johngives titleKing, asGreve Annaalready does under H1.Docs
interacts:links run both ways.Measured (py3.11, against master
eb2c1fa5)corpus_cldr.jsonl.bapak): one more move of the same shape,Bapak Adinata, Dwi Putro bin MP→ titleBapak.Smith, John161 → 161 andSmith Jones, John203 → 203: a part no title opens pays nothing. A titled part costs +1 (Dr. Smith, John200 → 201). A /simplify round took out a re-ask of pieces past the floor, so a long post-nominal run costs +1 rather than one frame per member. No reading moved on an 88,740-head grid.Review
A design-docs review found the first stop too broad: it asked "is the next word suffix vocabulary". A title/suffix dual second in a run blocked the peel and then read as a suffix inside the family (
Rev. Sr. Smith, Mary), and so didMc(Dr. Mc Donald, John). It found this by comparingT Smith, JohnwithT John Smithover every title word. The stop is now H3's question instead. The same review found W3, C1 and S2 prose still calling the pre-comma part wholly family, and one-wayinteracts:links; both are fixed. A second round (code, test-coverage and comment reviewers) found no parse defects and led to the changes below. A focused review of those fix commits found one false claim about 1.4.0, now corrected.govadded to TITLES (your call).Lt. Gov. Smith, Johnhad split into titleLt., familyGov. Smith. The cost: 236 US Census surname bearers, so a surname written first loses it (Gov Sokha). Recorded in decisions.md#H6, with its own release bullet.Dr. PhD Smith, Johnkeeps familyPhD Smith(your call). 1.4.0 and master read it familyDr. Smith, suffixPhD; the branch reads it as the untitledPhD Smith, Johnreads. No row, since it's garbage input.Freiherr, soGraf Lambsdorff, Ottoreads titleGraf. Whether the German ranks should all read asfreiherrdoes goes to its own issue.Lt. Gov.,Dr. King, aFAMILY_FIRST_GIVEN_LASTtwin and bareGov. These cover two mutants that had survived the whole suite.Full suite: 20526 passed. ruff and mypy are clean.
🤖 Generated with Claude Code